package cs271.hw5;


public class Customer {
	
	private int arrivalTime, lengthOfCheckout, priority, startTime, lastProcessTime;
	private String customerName;
	
	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public Customer(int arrivalTime, int lengthOfCheckout, int priority, String name) {
		this.priority = priority;
		this.arrivalTime = arrivalTime;
		this.lengthOfCheckout = lengthOfCheckout;
		this .customerName = name;
	}

	public int getPriority(){
		return priority;
	}
	
	public int getArrivalTime() {
		return arrivalTime;
	}

	public int getLengthOfCheckout() {
		return lengthOfCheckout;
	}
	
	//this determines how long a cust has been waiting before they have been processed
	public int getWaitTime(int currentTime) {
		if(lastProcessTime != 0){
			return lastProcessTime - currentTime;
		}else{
			return currentTime - arrivalTime;			
		}
	}

	public int getStartTime() {
		return startTime;
	}

	public void setStartTime(int startTime) {
		this.startTime = startTime;
	}

	public void setLengthOfCheckout(int lengthOfCheckout) {
		this.lengthOfCheckout = lengthOfCheckout;
	}

	public int getLastProcessTime() {
		return lastProcessTime;
	}

	public void setLastProcessTime(int lastProcessTime) {
		this.lastProcessTime = lastProcessTime;
	}	
	
}
